﻿<local:DocumentBase x:Class="WPFExcelReport.EK03"                    
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:ReflectionStudio.Core.Database;assembly=ReflectionStudio.Core"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    Title="采购单浏览"  
     >
    <local:DocumentBase.Resources>
        <db:INTEXDataSet x:Key="iNTEXDataSet" />
    </local:DocumentBase.Resources>
    <Grid DataContext="" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"></RowDefinition>
            <RowDefinition Height="120"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel Grid.Row="0">
            <Button Content="查询" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnQuery"
                        Click ="btnQuery_Click" VerticalAlignment="Top" Width="106" />
            <Button Content="产生报表" Height="25" HorizontalAlignment="Left" Margin="11,17,0,0" Name="btnReport"
                        Click ="btnReport_Click" VerticalAlignment="Top" Width="106" />
        </WrapPanel>
        <WrapPanel Grid.Row="1">
            <Grid Height="Auto" HorizontalAlignment="Stretch" >
                <WrapPanel Margin="0,0,0,37">
                    <Label Content="采购单号号码:"    Width="120" HorizontalAlignment="Left" Margin="3"  FontSize="18" VerticalAlignment="Center" />
                    <TextBox Name="txtKRS" Width="37" HorizontalAlignment="Left" Background="Pink" FontSize="18" Text=""  CharacterCasing="Upper" AcceptsTab="False" MaxLength="2" />
                    <TextBox Name="txtLFD" Width="90" HorizontalAlignment="Left" Background="Beige" Text="" FontSize="18" Height="30" AcceptsTab="False" CharacterCasing="Upper" MaxLength="6" Panel.ZIndex="1" />
                    <TextBox Name="txtPOS" Width="41" HorizontalAlignment="Left" Background="YellowGreen" FontSize="18" Text="" Height="30"  AcceptsTab="False" MaxLength="3" Panel.ZIndex="2" />
                    <Label Content="品种:"  Width="55"  HorizontalAlignment="Left" Margin="3"  FontSize="18" VerticalAlignment="Center" />
                    <TextBox Name="txtArticle" Text="" Width="113"  HorizontalAlignment="Left" Background="Azure" FontSize="18" CharacterCasing="Upper" AcceptsTab="False" MaxLength="20" Panel.ZIndex="3" />

                </WrapPanel>
                <WrapPanel Margin="0,35,0,0">
                <Label Content="下单时间从" Height="26" 
                       HorizontalAlignment="Left" Margin="5,5,0,0" Name="label1" 
                       VerticalAlignment="Top" Width="70" 
                       />
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="10,5,0,0" Name="FromOrderDate" VerticalAlignment="Top" Width="95" 
                                SelectedDateChanged="FromOrderDate_SelectedDateChanged"/>
                    <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label2" VerticalAlignment="Top" Width="29" />
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="5,5,0,0" Name="EndOrderDate" VerticalAlignment="Top" Width="95" 
                                SelectedDateChanged="EndOrderDate_SelectedDateChanged"/>
                    <Label Content="入仓时间从" Height="28" HorizontalAlignment="Left" Margin="20,5,0,0" Name="label3" VerticalAlignment="Bottom" Width="70" />
                    <DatePicker Height="25" HorizontalAlignment="Left" Margin="10,0,0,0" Name="FromIncomeDate" VerticalAlignment="Top" Width="95" 
                                SelectedDateChanged="FromIncomeDate_SelectedDateChanged"/>
                    <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="29" />
                <DatePicker Height="25" HorizontalAlignment="Right" Margin="10,5,0,0" Name="EndIncomeDate" VerticalAlignment="Top" Width="95" 
                                SelectedDateChanged="EndIncomeDate_SelectedDateChanged"/>
             </WrapPanel>
            </Grid>
        </WrapPanel>
        <fd:FilteringDataGrid Grid.Row="2"
            AutoGenerateColumns="False" EnableRowVirtualization="True"  
                                             ItemsSource="{Binding Path=EKPOS}"
                                              x:Name="MasterData" 
                                                 CanUserReorderColumns="True"  
                                             CanUserResizeRows="True"
                                              CanUserSortColumns="True"
                                              IsFilteringCaseSensitive="False" 
                                              RowDetailsVisibilityMode="VisibleWhenSelected"   
                                              Width="1000"
                                              Height="450"
                                              EnableColumnVirtualization="True"  
                                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                              ScrollViewer.VerticalScrollBarVisibility="Auto"
                                              SelectionChanged="ItemsControls_SelectionChanged">
            <DataGrid.Columns>
                <!--ABPAUFKRS;ABPAUFLFD;ABPAUFPOS;ABPART;ABPVAR;FACTORY;COLOR;ABPFARBE;QUANTITY;ABPSTARTDAT;ABPENDDAT;ACTENDDATE;-->
                <!--汇隆号	纱线编号	变量	纱线描述	色号	颜色	单前缀	单号	单行	供应商编号	供应商名称	开单数量	单位	单价	下单日期	首次到货日	完成日	入仓日期	ERP批次	供应商纺批	收货重量	欠数	差异率-->
                <DataGridTextColumn Binding="{Binding Path=CODE}" Header="汇隆号" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ART}" Header="纱线编号" Width="SizeToCells" MinWidth="90" />
                <DataGridTextColumn Binding="{Binding Path=VAR}" Header="变量" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=DES}" Header="纱线描述" Width="SizeToCells" MinWidth="120" />
                <DataGridTextColumn Binding="{Binding Path=FARBE}" Header="色号" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=COLOR}" Header="颜色" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=AUFKRS}" Header="前缀" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=AUFLFD}" Header="单号" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=AUFPOS}" Header="单行" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=LIEFNR}" Header="供应商编号" Width="SizeToCells" MinWidth="120" />
                <DataGridTextColumn Binding="{Binding Path=SUPPLIER}" Header="供应商名称" Width="SizeToCells" MinWidth="120" />
                <DataGridTextColumn Binding="{Binding Path=ORDERQTY}" Header="开单数量" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=UNIT}" Header="单位" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=PRICE}" Header="单价" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=ORDERDATE}" Header="下单日期" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=STARTDATE}" Header="首次到货日" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=ENDDATE}" Header="完成日期" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=INCOMEDATE}" Header="入仓日期" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=BATCH}" Header="ERP批次" Width="SizeToCells" MinWidth="60" />
                <DataGridTextColumn Binding="{Binding Path=SUPPLIERBATCH}" Header="供应商纺批" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=WEI}" Header="收货重量" Width="SizeToCells" MinWidth="100" />
                <DataGridTextColumn Binding="{Binding Path=DIFF}" Header="欠数" Width="SizeToCells" MinWidth="40" />
                <DataGridTextColumn Binding="{Binding Path=DIFF1}" Header="差异率" Width="SizeToCells" MinWidth="40" />
            </DataGrid.Columns>
        </fd:FilteringDataGrid>
    </Grid>
</local:DocumentBase > 